{% extends "../layout.html" %}

{% block content %}
<div class="dy-wrapper">
  <a href="/backend/adv_position/create" class="btn btn-sky-blue mb-3">添加</a>

  <table class="table table-bordered table-hover">
      <thead>
        <tr>
          <th scope="col">#</th>
          <th scope="col">名称</th>
          <th scope="col">标识</th>
          <th scope="col" width="120">创建日期</th>
          <th scope="col" width="120">更新日期</th>
          <th scope="col" width="120">操作</th>
        </tr>
      </thead>
      <tbody>
        {% for data in list %}
        <tr>
          <th scope="row">{{ data.id }}</th>
          <td>{{ data.name }}</td>
          <td>{{ data.flag }}</td>
          <td>{{ data.created_at.format("%Y-%m-%d") }}</td>
          <td>{{ data.updated_at.format("%Y-%m-%d") }}</td>
          <td>
            <a href="/backend/adv_position/edit/{{ data.id }}" class="btn btn-success btn-sm">编辑</a>
            <a href="javascript:void(0)" data-url="/backend/adv_position/delete/{{ data.id }}" class="btn btn-danger btn-sm deleteResource">删除</a>
          </td>
        </tr>
        {% endfor %}
      </tbody>
  </table>
</div>
{% endblock %}